/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-02-17
*/
package com.rzico.order.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.order.entity.ShippingItem;
import com.rzico.order.model.TrackingNoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzico.order.mapper.ShippingItemMapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 送货单项业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class ShippingItemService extends BaseServiceImpl<ShippingItem, String> {

    @Autowired
    private ShippingItemMapper shippingItemMapper;

    @Override
    public BaseMapper<ShippingItem, String> getMapper() {
        return shippingItemMapper;
    }


    public List<ShippingItem> getItemList(Long shippingId) {
        Map<String,Object> params = new HashMap<>();
        params.put("shippingId",shippingId);
        return shippingItemMapper.selectList(params);
    }

    public List<TrackingNoVo> getTrackingNoVoList(Map<String,Object> params) {
        return shippingItemMapper.getTrackingNoVoList(params);
    }



    public List<ShippingItem> getBarrelItemList(Long enterpriseId,Long shippingId) {
        Map<String,Object> params = new HashMap<>();
        params.put("shippingId",shippingId);
        params.put("enterpriseId",enterpriseId);
        return shippingItemMapper.selectBarrelList(params);
    }


}
